package com.hadron.transitions.behaviors 
{
	import com.hadron.transitions.enum.TransitionType;
	import com.hadron.transitions.ITransitionable;
	import flash.errors.IllegalOperationError;
	import temple.behaviors.AbstractBehavior;

	/**
	 * ...
	 * @author Hadron
	 */
	public class TransitionBehavior extends AbstractBehavior implements ITransitionBehavior
	{
		protected var _enabled:Boolean = true;
		protected var _type:TransitionType;
		protected var _vars:Object;
		
		public function TransitionBehavior(target:Object) 
		{
			super(target);			
		}
		
		/* INTERFACE components.slideshow.interfaces.ITransitionBehavior */
		public function get targetObject():ITransitionable { return target as ITransitionable; }
		public function set enabled(value:Boolean):void { _enabled = value; }
		public function get enabled():Boolean {	return _enabled; }
		public function transitionIn():void { throw new IllegalOperationError("override in subclass"); }
		public function transitionOut():void { throw new IllegalOperationError("override in subclass"); }
		public function enable():void	{ _enabled = true; }
		public function disable():void { _enabled = false; }
		public function set type(value:TransitionType):void { _type = value; }
		public function get type():TransitionType { return _type; }
		public function get vars():Object { return _vars; }
		public function set vars(value:Object):void { _vars = value; }
	}
}